import request from '@/utils/request.js'

/**
 *获取审批类型列表
 * @param {*} page
 * @param {*} pageSize
 * @param {*} oaProcessType
 * @returns
 */
export function list(page, pageSize, oaProcessType) {
  return request({
    url: '/oaProcessType/list',
    method: 'post',
    params: {
      page,
      pageSize
    },
    data: oaProcessType
  })
}
/**
 * 新增审批类型
 * @param {*} oaProcessType
 * @returns
 */
export function insert(oaProcessType) {
  return request({
    url: '/oaProcessType/insert',
    method: 'post',
    data: oaProcessType
  })
}
/**
 * 删除审批类型
 * @param {*} id
 * @returns
 */
export function deleteById(id) {
  return request({
    url: `/oaProcessType/deleteById/${id}`,
    method: 'delete'
  })
}
/**
 * 修改审批类型
 * @param {*} oaProcessType
 * @returns
 */
export function updateById(oaProcessType) {
  return request({
    url: '/oaProcessType/updateById',
    method: 'put',
    data: oaProcessType
  })
}
/**
 * 获取审批类型下拉选项
 * @returns
 */
export function getOptions() {
  return request({
    url: '/oaProcessType/getOptions',
    method: 'get'
  })
}
